import {
    doExec
} from '@/api/request'

const apiPrefix = window.apiPrefix;

export const api = {
    // 系统管理员
    manage: {
        // 登录
        login(opts) {
            return doExec(`${apiPrefix}login`, opts);
        },
        out(opts) {
            return doExec(`${apiPrefix}out`, opts);
        }
    },
    // 监控and档案
    biguser: {
        //实时监控数据
        real(opts) {
            return doExec(`${apiPrefix}api/biguser/real`, opts);
        },
        //用户类型
        types(opts) {
            return doExec(`${apiPrefix}api/biguser/types`, opts);
        },
        //行业
        industry(opts) {
            return doExec(`${apiPrefix}api/biguser/industry`, opts);
        },
        //节水型企业
        enterprise(opts) {
            return doExec(`${apiPrefix}api/biguser/enterprise`, opts);
        },
        //用水类型
        watertype(opts) {
            return doExec(`${apiPrefix}api/biguser/water/type`, opts);
        },
        //选择片区
        selArea(opts) {
            return doExec(`${apiPrefix}api/biguser/areaS0A2`, opts);
        },
        //选择营业所
        selDept(opts) {
            return doExec(`${apiPrefix}api/biguser/areaS0A1`, opts);
        },
        //新增档案
        biguser(opts) {
            return doExec(`${apiPrefix}api/biguser/add/biguser`, opts, 'JSON');
        },
        //用户编号判断
        isUserNum(opts) {
            return doExec(`${apiPrefix}api/biguser/isUserNum`, opts, 'JSON');
        },
        //档案列表
        recordList(opts) {
            return doExec(`${apiPrefix}api/biguser/record/list`, opts);
        },
        //批量删除
        removebiguser(opts) {
            return doExec(`${apiPrefix}api/biguser/remove/biguser`, opts);
        },
        //详情
        userdetail(opts) {
            return doExec(`${apiPrefix}api/biguser/userdetail`, opts);
        },
        //修改
        upbiguser(opts) {
            return doExec(`${apiPrefix}api/biguser/upbiguser`, opts, 'JSON');
        },
    },
    // 统计
    tongji: {
        //月均用水
        avgmonth(opts) {
            return doExec(`${apiPrefix}api/biguser/avgmonth`, opts);
        },
        //历史数据列表
        statisticsList(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/list`, opts);
        },
        //日
        day(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/day`, opts);
        },
        //月
        month(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/month`, opts);
        },
        //年
        year(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/year`, opts);
        },
        //供水数据报表
        sinstant(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/sinstant`, opts);
        },
        //排水数据报表
        dinstant(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/dinstant`, opts);
        },
        //查看缴费详情
        costDetail(opts) {
            return doExec(`${apiPrefix}api/biguser/costDetail`, opts);
        },
        //区域柱状图
        qyChat(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/qyChat`, opts);
        },
        //区域表单图
        qyform(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/qyform`, opts);
        },
        //行业统计柱状图
        hyChat(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/hyChat`, opts);
        },
        //异常统计
        ycCount(opts) {
            return doExec(`${apiPrefix}api/biguser/statistics/ycCount`, opts);
        },

    }
}